<template>
  <div>
    <p>接收到兄弟组件的消息：{{ msg }}</p>
  </div>
</template>

<script>
import {emitter} from '../../../../common/event-bus.js';

export default {
  data() {
    return {
      msg: ''
    };
  },
  mounted() {
    emitter.on('brother-msg', (message) => {
      this.msg = message;
    });
  },
  beforeUnmount() {
  }
};
</script>